package com.jinbo.footmessage;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;


import java.util.Timer;
import java.util.TimerTask;

/**
 * 欢迎引导页
 * 
 * @author yhs
 * 
 */
public class WelcomeActivity extends BaseActivity {

	private Timer mTimer;
	private TimerTask mTimerTask;
	private static Handler mHandler;
   // private LocalPreferencesHelper localPreferencesHelper;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_welcome);

/*        PushManager.startWork(getApplicationContext(),
                PushConstants.LOGIN_TYPE_API_KEY,
                "RXqW40h90Ti3nz3Ty8kym8E9");
        localPreferencesHelper = new LocalPreferencesHelper(this,LocalPreferencesHelper.DB_NAME);*//*
		mTimer = new Timer();
		mTimerTask = new TimerTask() {
			@Override
			public void run() {
               *//* if(localPreferencesHelper.getBooleanDefaultFalse(LocalPreferencesHelper.IS_FRIST_OPEN_APP)){
                    MainActivity.launch(WelcomeActivity.this);
                    finish();
                }else{*//*
				//    finish();
			//	Intent intent = new Intent(WelcomeActivity.this, NavigationActivity.class);
			   // startActivity(intent);
				NavigationActivity.launch(WelcomeActivity.this);
                   // finish();
              //  }
			}

		};
		mTimer.schedule(mTimerTask, 1000);*/
		mHandler = new Handler() {
			@Override
			public void handleMessage(Message msg) {
				//Intent intent = new Intent(WelcomeActivity.this, NavigationActivity.class);
				//startActivity(intent);

				NavigationActivity.launch(WelcomeActivity.this);
				finish();


			}
		};
		mHandler.sendEmptyMessageDelayed(0, 2000);
	}

}
